import { useState } from 'react'
interface Param {
  open: boolean
}
export function useLogin(): [Param, () => void] {
  const [modalConf, setModalConf] = useState<Param>({ open: false })
  function switchModalOpen() {
    setModalConf(res => {
      return { ...res, open: !res.open }
    })
  }
  return [modalConf, switchModalOpen]
}
